package helper

import (
	"database/sql"
	"github.com/widuu/goini"
	"fmt"
)

func NewDb() (db *sql.DB) {
	//载入config文件信息
	conf := goini.SetConfig("config/conf.ini")
	dsn := conf.GetValue("mysql", "dsn")
	fmt.Println(dsn)

	ndb := &Mysqlhelper{}
	return ndb.conn("root:1324@tcp(127.0.0.1:3306)/study?charset=utf8")
}
